const initValue = {
  user: {}, // tab中显示的数据
  profile: {}, // 个人编辑页, 要回显的数据
}

export default function profile(state = initValue, action) {
  switch (action.type) {
    case 'profile/setUser':
      return {
        ...state,
        user: { ...action.payload },
      }
    case 'profile/setProfile':
      return {
        ...state,
        profile: { ...action.payload },
      }
    default:
      return state
  }
}
